<style>
    :root {
        --primary: #165DFF;
        --primary-light: #E8F3FF;
        --primary-dark: #0E42D2;
        --secondary: #36CFC9;
        --success: #52C41A;
        --warning: #FAAD14;
        --danger: #FF4D4F;
        --dark: #1D2129;
        --gray: #86909C;
        --light: #F2F3F5;
        --border: #E5E6EB;
        --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.1);
    }

    body {
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        background-color: #F7F8FA;
        color: var(--dark);
        line-height: 1.6;
    }

    /* 主内容区 */
    .main-content {
        padding: 2rem 0;
    }

    /* 内容卡片样式 */
    .content-card {
        background-color: white;
        border-radius: 12px;
        box-shadow: var(--shadow);
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .content-card .section-title {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
    }

    .content-card .section-title i {
        color: var(--primary);
        margin-right: 0.5rem;
    }

    /* 推荐内容网格 */
    .content-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .post-card {
        border-radius: 8px;
        overflow: hidden;
        background-color: white;
        box-shadow: var(--shadow);
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .post-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-hover);
    }

    .post-card .post-image {
        width: 100%;
        aspect-ratio: 1;
        object-fit: cover;
    }

    .post-card .post-content {
        padding: 1rem;
    }

    .post-card .post-author {
        display: flex;
        align-items: center;
        margin-bottom: 0.75rem;
    }

    .post-card .author-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
        margin-right: 0.75rem;
    }

    .post-card .author-name {
        font-weight: 600;
        font-size: 0.9rem;
    }

    .post-card .post-text {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .post-card .post-actions {
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
        color: var(--gray);
    }

    .post-card .post-action {
        display: flex;
        align-items: center;
        cursor: pointer;
        transition: color 0.2s;
    }

    .post-card .post-action:hover {
        color: var(--primary);
    }

    .post-card .post-action i {
        margin-right: 0.35rem;
    }

    /* 响应式设计 */


    @media (max-width: 576px) {
        .main-content {
            padding: 1.5rem 0;
        }

        .content-grid {
            grid-template-columns: 1fr;
        }

    }
</style>


<div class="container main-content">
    <!-- 推荐内容 -->
    <div class="content-card">
        <h2 class="section-title"><i class="fas fa-star"></i> 为你推荐</h2>

        <div class="content-grid">
            <div class="post-card">
                <img src="https://picsum.photos/600/600?random=10" alt="旅行照片" class="post-image">
                <div class="post-content">
                    <div class="post-author">
                        <img src="https://picsum.photos/100/100?random=11" alt="用户头像" class="author-avatar">
                        <span class="author-name">旅行爱好者</span>
                    </div>
                    <div class="post-text">分享一组上周在海边拍摄的照片，天气真的太好了，海水湛蓝清澈，推荐大家去看看！</div>
                    <div class="post-actions">
                        <div class="post-action"><i class="far fa-heart"></i> 245</div>
                        <div class="post-action"><i class="far fa-comment"></i> 36</div>
                        <div class="post-action"><i class="far fa-share-square"></i> 12</div>
                    </div>
                </div>
            </div>

            <div class="post-card">
                <img src="https://picsum.photos/600/600?random=12" alt="美食照片" class="post-image">
                <div class="post-content">
                    <div class="post-author">
                        <img src="https://picsum.photos/100/100?random=13" alt="用户头像" class="author-avatar">
                        <span class="author-name">美食家小李</span>
                    </div>
                    <div class="post-text">今天尝试做了一道新菜，香煎三文鱼配芦笋，味道很不错，分享给大家做法...</div>
                    <div class="post-actions">
                        <div class="post-action"><i class="far fa-heart"></i> 189</div>
                        <div class="post-action"><i class="far fa-comment"></i> 42</div>
                        <div class="post-action"><i class="far fa-share-square"></i> 28</div>
                    </div>
                </div>
            </div>

            <div class="post-card">
                <img src="https://picsum.photos/600/600?random=14" alt="读书照片" class="post-image">
                <div class="post-content">
                    <div class="post-author">
                        <img src="https://picsum.photos/100/100?random=15" alt="用户头像" class="author-avatar">
                        <span class="author-name">书虫一枚</span>
                    </div>
                    <div class="post-text">最近在读这本书，内容很有深度，尤其是关于人性的探讨，值得推荐给大家。</div>
                    <div class="post-actions">
                        <div class="post-action"><i class="far fa-heart"></i> 326</div>
                        <div class="post-action"><i class="far fa-comment"></i> 58</div>
                        <div class="post-action"><i class="far fa-share-square"></i> 45</div>
                    </div>
                </div>
            </div>

            <div class="post-card">
                <img src="https://picsum.photos/600/600?random=16" alt="摄影照片" class="post-image">
                <div class="post-content">
                    <div class="post-author">
                        <img src="https://picsum.photos/100/100?random=17" alt="用户头像" class="author-avatar">
                        <span class="author-name">摄影爱好者</span>
                    </div>
                    <div class="post-text">清晨的城市，光线刚刚好，随手拍了一张，分享给喜欢摄影的朋友们。</div>
                    <div class="post-actions">
                        <div class="post-action"><i class="far fa-heart"></i> 278</div>
                        <div class="post-action"><i class="far fa-comment"></i> 31</div>
                        <div class="post-action"><i class="far fa-share-square"></i> 19</div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 热门话题 -->
    <div class="content-card">
        <h2 class="section-title"><i class="fas fa-fire-alt"></i> 热门话题</h2>

        <div class="row">
            <div class="col-md-6">
                <div class="d-flex align-items-center p-3 border-bottom border-light">
                    <div class="bg-primary-light text-primary p-3 rounded-circle me-3">
                        <i class="fas fa-utensils fa-lg"></i>
                    </div>
                    <div>
                        <h5 class="mb-1">#夏日美食推荐#</h5>
                        <p class="text-muted mb-0 small">12.5k 帖子 · 32.8k 参与</p>
                    </div>
                </div>

                <div class="d-flex align-items-center p-3 border-bottom border-light">
                    <div class="bg-primary-light text-primary p-3 rounded-circle me-3">
                        <i class="fas fa-plane fa-lg"></i>
                    </div>
                    <div>
                        <h5 class="mb-1">#暑期旅行计划#</h5>
                        <p class="text-muted mb-0 small">8.7k 帖子 · 25.3k 参与</p>
                    </div>
                </div>
            </div>

            <div class="col-md-6">
                <div class="d-flex align-items-center p-3 border-bottom border-light">
                    <div class="bg-primary-light text-primary p-3 rounded-circle me-3">
                        <i class="fas fa-book fa-lg"></i>
                    </div>
                    <div>
                        <h5 class="mb-1">#年度好书推荐#</h5>
                        <p class="text-muted mb-0 small">6.3k 帖子 · 18.2k 参与</p>
                    </div>
                </div>

                <div class="d-flex align-items-center p-3 border-bottom border-light">
                    <div class="bg-primary-light text-primary p-3 rounded-circle me-3">
                        <i class="fas fa-film fa-lg"></i>
                    </div>
                    <div>
                        <h5 class="mb-1">#高分电影分享#</h5>
                        <p class="text-muted mb-0 small">9.4k 帖子 · 29.7k 参与</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
	document.addEventListener('DOMContentLoaded', function () {
		// 为帖子卡片的互动按钮添加交互
		const likeButtons = document.querySelectorAll('.post-action i.far.fa-heart');
		likeButtons.forEach(button => {
			button.addEventListener('click', function (e) {
				e.stopPropagation();
				this.classList.toggle('far');
				this.classList.toggle('fas');
				this.classList.toggle('text-danger');

				// 更新点赞数量
				const parent = this.parentElement;
				let count = parseInt(parent.textContent.trim().split(' ')[1]);
				if (this.classList.contains('fas')) {
					parent.innerHTML = `<i class="${this.classList.value}"></i> ${count + 1}`;
				} else {
					parent.innerHTML = `<i class="${this.classList.value}"></i> ${count - 1}`;
				}
			});
		});
	});
</script>

    
